using B.S.XZYData.ErrorCode;
using MediatR;

namespace B.S.XZYData.Api.Read.Application.Command.SalesOrder
{
    /// <summary>
    /// 查询销售订单命令
    /// </summary>
    public class QuerySalesOrderCommand : IRequest<ApiResult<ApiPageing<SalesOrderDTO>>>
    {
        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; } = 10;

        /// <summary>
        /// 单据编号
        /// </summary>
        public string? OrderNo { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }

    /// <summary>
    /// 销售订单DTO
    /// </summary>
    public class SalesOrderDTO
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 单据编号
        /// </summary>
        public string OrderNo { get; set; } = string.Empty;

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreatorName { get; set; } = string.Empty;

        /// <summary>
        /// 修改人
        /// </summary>
        public string? ModifierName { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyTime { get; set; }
    }
}
